import request from '@/utils/request'

export function getSubject() {
    return request({
        url: `/course/subject/getSubject`,
        method: 'get'
    })
}

export function saveSubject(subject) {
    return request({
        url: `/course/subject/saveSubject`,
        method: 'put',
        params: { ...subject }
    })
}

export function deleteSubjectById(id) {
    return request({
        url: `/course/subject/deleteSubjectById/${id}`,
        method: 'delete',
    })
}

export function updateSubject(subject) {
    return request({
        url: `/course/subject/updateSubject`,
        method: 'post',
        data: subject
    })
}

export function updateSubjects(subjects) {
    return request({
        url: `/course/subject/updateSubjects`,
        method: 'post',
        data: subjects
    })
}